<h3 class="login-title">登录</h3>
  <?php 
		echo form_open('user/validate_credentials');
	?>
	<div class="login-input-wrapper clearfix">
		<label class="login-label" for="username">用户名</label>
		<?php
		$ndata = array('name' => 'user_name', 'id' => 'username','class' =>'login-input', 'size' => '25','tabindex'=>'1');
		echo form_input($ndata);
		?>
	</div>
						
	<div class="login-input-wrapper clearfix">
		<label class="login-label" for="password">密 &nbsp;&nbsp;码</label>
		<?php
		$pdata = array('name' => 'password', 'id' => 'password','type'=>'password','class' =>'login-input', 'size' => '25','tabindex'=>'2');
		echo form_input($pdata);
		?>
	</div>
	
	<div class="remember-me clearfix">
		<label class='message-error'><?php echo $error ?></label>
		<?php
			$rdata = array('name'=>'remember','value'=>'保持登录状态','tabindex'=>'3');
			echo form_checkbox($rdata);
			
		?>
		<label>保持登录状态</label>
	</div>
	
	<div class="last-option clearfix">
	<?php 
		$sdata = array('name'=>'submit','value'=>'Login','class'=>'login-submit','tabindex'=>'4');
		
		echo form_submit($sdata);
	?>
		<span class="reg-link">
	<?php
		echo '没有帐号？快来';
		$regdata = array('');
		echo anchor('user/register', '注册');
		echo '吧';
	?>
		</span>
	</div>

	<?php
	echo form_close();
	?>

	<div class="other-tips">
		<ul xmlns="http://www.w3.org/1999/xhtml" id="help-links">
			<li class="icon-pass">
				忘记了您的通行证<a href="javascript:alert('开发中...')" title='找回密码'>密码</a>？
			</li>
			<li class="icon-secure">
				了解如何<a href="javascript:alert('编写中...')" title='隐私政策'>保护您的个人隐私</a>！
			</li>
			<li class="icon-signup">
				还没有通行证？<?php echo anchor('user/register', '现在就注册');?>！
			</li>
			<li class="icon-about">
				不知道<span class='webname'>在哪儿</span>是<a href="javascript:alert('开发中...')" title='关于我们'> 什么网站</a>？
			</li>			
		</ul>
	</div>	


<script type="text/javascript">
	$(function(){
		if($("#username").val()!="")
			$(".login-label[for='username']").hide();
		if($("#password").val()!="")
			$(".login-label[for='password']").hide();
	});
	
	$("#username").focus(function(){
		$(".login-label[for='username']").css("color","#CCC");
		$("#username").css("border","1px solid #FFC34C");
		if($("#username").val()!="")
			$(".login-label[for='username']").hide();
	});
	
	$("#username").keypress(function(){
		$(".login-label[for='username']").hide();
	});
	
	$("#username").click(function(){
		if($("#username").val()!=""){
			$(".login-label[for='username']").hide();
		}
	});
	
	$("#username").change(function(){
		if($("#username").val()!=""){
			$(".login-label[for='username']").hide();
		}
	});
	
	$("#username").blur(function(){
		if(this.value==""){
			$(".login-label[for='username']").show();
			$(".login-label[for='username']").css("color","#92A2AF");	
		}
		else
			$(".login-label[for='username']").hide();
		
		$("#username").css("border","1px solid #FFF");
	});
	
	$("#password").focus(function(){
		$(".login-label[for='password']").css("color","#CCC");
		$("#password").css("border","1px solid #FFC34C");
		if($("#password").val()!="")
			$(".login-label[for='password']").hide();
	});
	
	$("#password").keypress(function(){
		$(".login-label[for='password']").hide();
	});
	
	$("#password").click(function(){
		if(this.value!=""){
			$(".login-label[for='password']").hide();
		}
	});
	
	$("#password").change(function(){
		if(this.value!=""){
			$(".login-label[for='password']").hide();
		}
	});
	
	$("#password").blur(function(){
		if(this.value==""){
			$(".login-label[for='password']").show();
			$(".login-label[for='password']").css("color","#92A2AF");	
		}
		else
			$(".login-label[for='password']").hide();
		
		$("#password").css("border","1px solid #FFF");
	});
</script>